import { request } from "@/utils/service"
import axios from "axios"
import { getToken } from "@/utils/cache/cookies"
const baseURL = import.meta.env.VITE_BASE_API
/** 增 */
export function createwebOrderDataApi(data: any) {
  return request({
    url: "/webOrder/add",
    method: "post",
    data
  })
}

/** 改 */
export function updatewebOrderDataApi(data: any) {
  return request({
    url: "/webOrder/update2",
    method: "put",
    data
  })
}
/** 再次提交 */
export function updatewebOrderDataApiZC(data: any) {
  return request({
    url: "/webOrder/againSubmit",
    method: "post",
    data
  })
}
/** 查 */
export function getwebOrderDataApi(params: any) {
  return request({
    url: "/webOrder/query",
    method: "get",
    params
  })
}
/** 查订单详情 */
export function getDetailedApi(params: any) {
  return request({
    url: "/webOrder/detailed",
    method: "get",
    params
  })
}
/** 查宽带类型 */
export function getwebSetApi(params: any) {
  return request({
    url: "/webSet/queryAreaAll",
    method: "get",
    params
  })
}

/** 查宽带类型 */
export function getwebSetApiTwo() {
  return request({
    url: "webSet/queryAll",
    method: "get"
  })
}

/** 查宽带套餐下配置金额 */
export function getwebSetFeeApi(params: any) {
  return request({
    url: "/webSet/queryFee",
    method: "get",
    params
  })
}

/** 查宽带订单小红点 */
export function getwebqueryState() {
  return request({
    url: "/webOrder/queryState",
    method: "get"
  })
}
// 订单导出
export function downLoadOrder(data: any) {
  return axios({
    url: `${baseURL}/webOrder/downOrder`,
    method: "post",
    headers: {
      "Content-Type": "multipart/form-data",
      token: getToken()
    },
    data,
    responseType: "blob"
  })
}
// 所有人修改订单备注
export function updateRemark(data: any) {
  return request({
    url: "/webOrder/updateRemark ",
    method: "put",
    data
  })
}
// 查询修改订单备注日志 /remarkLog/query
export function remarkLog(params: any) {
  return request({
    url: "/remarkLog/query",
    method: "get",
    params
  })
}
